package _15_generics._15_4;

import _15_generics._15_4.CountedObject;
import net.mindview.util.BasicGenerator;
import net.mindview.util.Generator;

/**
 * 使用BasicGenerator 创建对象
 */
public class _06_BasicGeneratorDemo {
    public static void main(String[] args) {
        Generator<CountedObject> gen = BasicGenerator.create(CountedObject.class);
        for (int i = 0; i < 5; i++) {
            System.out.println(gen.next());
        }
    }
}
